/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class SubmenuPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "menuId")
    private short menuId;
    @Basic(optional = false)
    @Column(name = "submenuId")
    private short submenuId;

    public SubmenuPK() {
    }

    public SubmenuPK(short menuId, short submenuId) {
        this.menuId = menuId;
        this.submenuId = submenuId;
    }

    public short getMenuId() {
        return menuId;
    }

    public void setMenuId(short menuId) {
        this.menuId = menuId;
    }

    public short getSubmenuId() {
        return submenuId;
    }

    public void setSubmenuId(short submenuId) {
        this.submenuId = submenuId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) menuId;
        hash += (int) submenuId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SubmenuPK)) {
            return false;
        }
        SubmenuPK other = (SubmenuPK) object;
        if (this.menuId != other.menuId) {
            return false;
        }
        if (this.submenuId != other.submenuId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.SubmenuPK[ menuId=" + menuId + ", submenuId=" + submenuId + " ]";
    }
    
}
